package top.zhangjianyong.blog.ai.model;

import lombok.Data;
import top.zhangjianyong.blog.entity.dto.BlogDTO;

/**
 * @author zhangjianyong
 * @since 2025/7/8 22:38
 */
@Data
public class BlogData {
  private String id;
  private String text;

  public static BlogData from(BlogDTO blog) {
    BlogData blogData = new BlogData();
    blogData.setId(blog.getId().toString());
    blogData.setText(blog.getTitle() + "\n" + blog.getSummary() + "\n" + blog.getMkContent());
    return blogData;
  }
}
